<?php
//get memberCard info
$cardTable = new BASpaceSheet('memberCard');
$card = $cardTable->getListById($memberCardId);
$fixedCardId = null;
$mobile = NULL;
$gender = NULL;
$familyName = NULL;
$surName = NULL;
$birthField = NUll;
$expireTime = NULL;
$description = NULL;
if ($card->getItem('fixedCardId') != NULL)
	$fixedCardId = $card->getItem('fixedCardId')->getValue();
if ($card->getItem('mobile') != NULL)
	$mobile = $card->getItem('mobile')->getValue();
if ($card->getItem('gender') != NULL)
	$gender = $card->getItem('gender')->getValue();
if ($card->getItem('familyName') != NULL)
	$familyName = $card->getItem('familyName')->getValue();
if ($card->getItem('surName') != NULL)
	$surName = $card->getItem('surName')->getValue();
if ($card->getItem('birthField') != NULL)
	$birthField = $card->getItem('birthField')->getValue();
if ($card->getItem('expireTime') != NULL)
	$expireTime = $card->getItem('expireTime')->getValue();
if ($card->getItem('description') != NULL)
	$description = $card->getItem('description')->getValue();

//根据mobile获取积分
$memberPointCooker = new BAMemberPointCooker();
$memberPointAccount = $memberPointCooker->getMemberPointAccountByUser();
?>
<?php echo $control->renderView("header"); ?>

<div id="page_card" class="div-body">

    <div id="mappContainer">
        <div class="inner root" style="height: 519px;">
            <div class="card" style="background:url(<?php echo Yii::app()->request->baseUrl.'/images/BWeMember/wei_webapp_new/card_bk_1.png'?>) no-repeat 0 0;-webkit-background-size:267px 159px;background-size:267px 159px;" data-card-type="0">
                <img src="<?php echo Yii::app()->request->baseUrl.'/images/BWeMember/weixin_shop_logo/2543529110_card_170_170.png'?>" class="logo">
                <h1></h1>
                <strong class="pdo verify"><span style="color:#92714e;text-shadow:0 1px #f1e7dc;"><em style="color:#92714e;text-shadow:0 1px #f1e7dc;">会员卡号</em><?php echo $fixedCardId;?></span></strong>
            </div>

            <p><span>使用时向服务员出示此卡</span></p>

            <ul class="round" id="customs2" style="display: none;"></ul>

            <ul class="round" id="privates">
<!--                <li style="background:url(<?php echo Yii::app()->request->baseUrl.'/images/BWeMember/wei_webapp_new/icon_balance.png'?>) no-repeat 9px 14px;-webkit-background-size:24px 21px;background-size:24px 21px;">
                    <a class="balance" href="#" onclick="<?php // echo $ajaxScript1?>">账户余额:0元<span hidden="">null</span><i hidden="">null</i></a>
                </li>-->
                <li style="background:url(<?php echo Yii::app()->request->baseUrl.'/images/BWeMember/wei_webapp_new/icon_score.png'?>) no-repeat 9px 14px;-webkit-background-size:24px 21px;background-size:24px 21px;">
                    <?php
                    $ajaxScript2 =  $control->getAjaxScript('ShowMyPoint', array(
                        'cooker' => '',
                    ));
                    ?>
                    <a class="score" href="#" onclick="<?php // echo $ajaxScript2?>">我的积分:0分<span hidden="">null</span><i hidden="">null</i></a>
                </li>
            </ul>

            <ul class="round" id="customs">
                <li>
                    <a href="#" style="background-size: 0px;">会员信息</a>
                </li>
                <li class="power">
                    <article>
                        <a href="#" style="height: 20px;">
                            <p>姓名：<?php echo $familyName.$surName; ?>
                            </p>
                        </a>
                    </article>
                </li>
                <li class="power">
                    <article>
                        <a href="#" style="height: 20px;">
                            <p>联系电话：<?php echo $mobile; ?>
                            </p>
                        </a>
                    </article>
                </li>
                <?php
                if($expireTime != NULL){
                    ?>
                <li class="power">
                    <article>
                        <a href="#" style="height: 20px;">
                            <p>会员有效期至：<?php echo $expireTime; ?>
                            </p>
                        </a>
                    </article>
                </li>
                <?php
                }
                ?>
            </ul>

<!--            <ul class="round" id="additional">
                <li>
                    <a class="record" href="#">交易记录</a>
                </li>
            </ul>-->

            <a href="javascript:void(0)" class="helpTel">使用会员卡遇到了问题？</a>
        </div>
        <div class="footFix" id="modal"></div>
    </div>

    <?php echo $control->renderView("footer"); ?>

</div>
